<template>
    <div>
        <h3>Welcome</h3>
        <el-checkbox-group v-model="citiesChecked" @change="changeBox">
            <el-checkbox :label="item" v-for="item in cities" :key="item"></el-checkbox>
        </el-checkbox-group>
    </div>
</template>

<script>
import _ from 'lodash'
    export default {
        data() {
            return {
                cities: ['上海', '北京', '广州', '深圳'],
                citiesChecked: ['上海', '北京', '广州', '深圳'],
            }
        },created() {
            let newData=_.cloneDeep(this.data)
            this.newData=newData
        },
        methods: {
            changeBox(){
                // this.data=this.newData
                console.log(this.citiesChecked)
            }
        },
    }
</script>

<style lang="less" scoped>

</style>